<?php echo $this->element('menu'); ?>
<h1>Danh sách các ảnh của board <?php echo $boardId; ?></h1>
<?php 
	echo $this->Html->link('add new image', array('action'=>'addImageIntoBoard', $boardId));
	echo ' | ' ;
	echo $this->Html->link('pin image', array('action'=>'listImage', $boardId));
?>
<table>
	<tr>
		<th>Id</th>
		<th>name</th>
		<th>image</th>
		<th>description</th>
		<th>creadted</th>
		<th>updated</th>
		<th>delete_flag</th>
		<th>action</th>
	</tr>

	<?php $i=0; foreach($images as $image): $i++; ?>
	<tr>
		<td><?php echo $image['UserImageBoard']['id']; ?></td>
		<td><?php echo $image['Image']['name']; ?></td>
		<td><?php echo $this->Html->image($image['Image']['url'], array('alt' => 'CakePHP')); ?>
		<td><?php echo $image['UserImageBoard']['description']; ?></td>
		<td><?php echo $image['Image']['created']; ?></td>
		<td><?php echo $image['UserImageBoard']['updated']; ?></td>
		<td><?php echo $image['UserImageBoard']['delete_flag']; ?></td>
		<td><?php 
				echo $this->Html->link('edit', array('action'=>'editImageInBoard', $image['UserImageBoard']['id']));
				echo $this->Html->link('comment', array('controller'=>'UserComments','action'=>'comments', $image['UserImageBoard']['id']));
				echo $this->Html->link('delete', array('action'=>'deleteImageInBoard', $image['UserImageBoard']['id'],$image['UserImageBoard']['board_id']));

			?></td>
	</tr>
	<?php endforeach; ?>
</table>
<?php echo $this->Html->link('list boards', array('action'=>'viewInfoBoards'));?>